package com.qianyu.project.mapper;

import com.qianyu.project.entity.MaterialClass;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qianyu.project.web.controller.mfy.utils.MaterialClassBean;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 材料类别 Mapper 接口
 * </p>
 *
 * @author gs
 * @since 2021-01-30
 */
@Repository
public interface MaterialClassMapper extends BaseMapper<MaterialClass> {

    @Select("select id,name as label,parent_id as parentid  from material_class")
    List<MaterialClassBean> getTreeNode();
}
